package com.qingke.qkmall.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.qingke.qkmall.pojo.Category;
import com.qingke.qkmall.serviceInterface.CategoryService;

/**
 * 商品分类Controller
 * @author Administrator
 *
 */
@Controller
public class CategoryController {
	
	@Autowired
	private CategoryService categoryService;
	
	@RequestMapping(value = "/itemSelect") 
	@ResponseBody
	public List<Category> getItems() {
		List<Category> list = categoryService.selectAllCategory();
		return list;
	}
}
